/* Copyright 2021 Kerim Yalcin
**
**   Licensed under the Apache License, Version 2.0 (the "License");
**   you may not use this file except in compliance with the License.
**   You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
**   Unless required by applicable law or agreed to in writing, software
**   distributed under the License is distributed on an "AS IS" BASIS,
**   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
**   See the License for the specific language governing permissions and
**   limitations under the License.
*/

#include "Button.hpp"

Agx::Button::Button(HINSTANCE pInstance, HWND pParent_Window) :
    WindowBase{pInstance} {

    mID = -1;

    mWndClass_Name = "button";
    mWindow_Name = "<empty>";
    
    mExtendedStyle  = 0;
    mStyle          = WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON |BS_CHECKBOX | BS_PUSHLIKE;
    
    mPosition_X     = 10;
    mPosition_Y     = 10;
    mWindow_Width   = 100;
    mWindow_Heigth  = 30;
    mWindow_Parent  = pParent_Window;
    mMenu           = nullptr;
    mParam          = nullptr;
}

void Agx::Button::set_Button_ID(const int& pButton_ID) {
    mID = pButton_ID;
    mMenu = (HMENU)(UINT_PTR)pButton_ID;
}

const int& Agx::Button::get_Button_ID() {
    return mID;
}

void Agx::Button::set_ButtonText(const std::string& pButtonText) {
    mWindow_Name = pButtonText;
}

const std::string& Agx::Button::get_ButtonText() {
    return mWindow_Name;
}